using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/****************************************************
// 功能：Buff效果表现
// | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
// | Copyright (c) 2021-2025 聊来 All rights reserved.
// | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">聊来</a> )
// | @Author: 贯彻己道的云 <18970881148@qq.com>
// | DateTime: 2025/4/8 17:25:5
*****************************************************/

public class BuffView : ViewUnit {
    private Buff buff;
    public override void Init(LogicUnit buff) {
        base.Init(buff);
        this.buff = buff as Buff;

        if (this.buff!.cfg.staticPosType == StaticPosTypeEnum.None) return;
        //固定位置buff
        transform.position = buff.LogicPos.ConvertViewVector3();
        transform.rotation = CalcRotation(buff.LogicDir.ConvertViewVector3());
    }

    //用一个空函数覆盖位置与方向的更新
    protected override void Update() { }

    public void DestroyBuff() {
        Destroy(gameObject, 0.1f);
    }
}
